<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div class="sidebar-menu">
    <header class="logo1">
        <a href="#" class="sidebar-icon"> <span class="fa fa-bars"></span></a>
    </header>
    <div class="menu">
        <ul id="menu">
            <li>
                <a href="${pageContext.request.contextPath}/backdoor/index"><i class="glyphicon glyphicon-th-large"></i>
                    <span>主页</span>
                    <div class="clearfix"></div>
                </a>
            </li>

            <li>
                <a href="${pageContext.request.contextPath}/backdoor/userManager">
                    <i class="glyphicon glyphicon-user"></i>
                    <span>用户管理</span>
                    <div class="clearfix"></div>
                </a>
            </li>
            <li>
                <a href="${pageContext.request.contextPath}/backdoor/illegalities">
                    <i class="glyphicon glyphicon-minus-sign"></i>
                    <span>违规处理</span>
                    <div class="clearfix"></div>
                </a>
            </li>
            <li>
                <a href="${pageContext.request.contextPath}/backdoor/blackHouse">
                    <i class="glyphicon glyphicon-home"></i>
                    <span>小黑屋</span>
                    <div class="clearfix"></div>
                </a>
            </li>
            <li>
                <a href="${pageContext.request.contextPath}/backdoor/topicManager">
                    <i class="glyphicon glyphicon-list-alt"></i>
                    <span>话题管理</span>
                    <div class="clearfix"></div>
                </a>
            </li>
            <li>
                <a href="${pageContext.request.contextPath}/backdoor/wordFilter">
                    <i class="glyphicon glyphicon-pencil"></i>
                    <span>关键字过滤</span>
                    <div class="clearfix"></div>
                </a>
            </li>
            <li>
                <a href="${pageContext.request.contextPath}/backdoor/calendar">
                    <i class="glyphicon glyphicon-calendar"></i>
                    <span>日历</span>
                    <div class="clearfix"></div>
                </a>
            </li>
        </ul>
    </div>
</div>
<script>
    var toggle = true;

    $(".sidebar-icon").click(function () {
        if (toggle) {
            $(".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
            $("#menu").find("span").css({
                "position": "absolute"
            });
        } else {
            $(".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back");
            setTimeout(function () {
                $("#menu").find("span").css({
                    "position": "relative"
                });
            }, 400);
        }

        toggle = !toggle;
    });
</script>